/*
 *
 *    Copyright (c) 2022 Project CHIP Authors
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

// THIS FILE IS GENERATED BY ZAP
// This file is generated from clusters-Structs.h.zapt

#pragma once

#include <app/data-model/DecodableList.h>
#include <app/data-model/List.h>
#include <app/data-model/Nullable.h>
#include <lib/core/DataModelTypes.h>
#include <lib/core/Optional.h>
#include <lib/core/TLV.h>
#include <lib/support/BitMask.h>

#include <clusters/shared/Structs.h>

#include <cstdint>

namespace chip
{
namespace app
{
	namespace Clusters
	{
		namespace CameraAvStreamManagement
		{
			namespace Structs
			{
				namespace VideoResolutionStruct
				{
					enum class Fields : uint8_t {
						kWidth = 0,
						kHeight = 1,
					};

					struct Type {
					public:
						uint16_t width = static_cast<uint16_t>(0);
						uint16_t height = static_cast<uint16_t>(0);

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					using DecodableType = Type;

				} // namespace VideoResolutionStruct
				namespace VideoStreamStruct
				{
					enum class Fields : uint8_t {
						kVideoStreamID = 0,
						kStreamUsage = 1,
						kVideoCodec = 2,
						kMinFrameRate = 3,
						kMaxFrameRate = 4,
						kMinResolution = 5,
						kMaxResolution = 6,
						kMinBitRate = 7,
						kMaxBitRate = 8,
						kKeyFrameInterval = 9,
						kWatermarkEnabled = 10,
						kOSDEnabled = 11,
						kReferenceCount = 12,
					};

					struct Type {
					public:
						uint16_t videoStreamID = static_cast<uint16_t>(0);
						Globals::StreamUsageEnum streamUsage =
							static_cast<Globals::StreamUsageEnum>(0);
						VideoCodecEnum videoCodec = static_cast<VideoCodecEnum>(0);
						uint16_t minFrameRate = static_cast<uint16_t>(0);
						uint16_t maxFrameRate = static_cast<uint16_t>(0);
						Structs::VideoResolutionStruct::Type minResolution;
						Structs::VideoResolutionStruct::Type maxResolution;
						uint32_t minBitRate = static_cast<uint32_t>(0);
						uint32_t maxBitRate = static_cast<uint32_t>(0);
						uint16_t keyFrameInterval = static_cast<uint16_t>(0);
						Optional<bool> watermarkEnabled;
						Optional<bool> OSDEnabled;
						uint8_t referenceCount = static_cast<uint8_t>(0);

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					using DecodableType = Type;

				} // namespace VideoStreamStruct
				namespace SnapshotStreamStruct
				{
					enum class Fields : uint8_t {
						kSnapshotStreamID = 0,
						kImageCodec = 1,
						kFrameRate = 2,
						kMinResolution = 3,
						kMaxResolution = 4,
						kQuality = 5,
						kReferenceCount = 6,
						kEncodedPixels = 7,
						kHardwareEncoder = 8,
						kWatermarkEnabled = 9,
						kOSDEnabled = 10,
					};

					struct Type {
					public:
						uint16_t snapshotStreamID = static_cast<uint16_t>(0);
						ImageCodecEnum imageCodec = static_cast<ImageCodecEnum>(0);
						uint16_t frameRate = static_cast<uint16_t>(0);
						Structs::VideoResolutionStruct::Type minResolution;
						Structs::VideoResolutionStruct::Type maxResolution;
						uint8_t quality = static_cast<uint8_t>(0);
						uint8_t referenceCount = static_cast<uint8_t>(0);
						bool encodedPixels = static_cast<bool>(0);
						bool hardwareEncoder = static_cast<bool>(0);
						Optional<bool> watermarkEnabled;
						Optional<bool> OSDEnabled;

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					using DecodableType = Type;

				} // namespace SnapshotStreamStruct
				namespace SnapshotCapabilitiesStruct
				{
					enum class Fields : uint8_t {
						kResolution = 0,
						kMaxFrameRate = 1,
						kImageCodec = 2,
						kRequiresEncodedPixels = 3,
						kRequiresHardwareEncoder = 4,
					};

					struct Type {
					public:
						Structs::VideoResolutionStruct::Type resolution;
						uint16_t maxFrameRate = static_cast<uint16_t>(0);
						ImageCodecEnum imageCodec = static_cast<ImageCodecEnum>(0);
						bool requiresEncodedPixels = static_cast<bool>(0);
						Optional<bool> requiresHardwareEncoder;

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					using DecodableType = Type;

				} // namespace SnapshotCapabilitiesStruct
				namespace RateDistortionTradeOffPointsStruct
				{
					enum class Fields : uint8_t {
						kCodec = 0,
						kResolution = 1,
						kMinBitRate = 2,
					};

					struct Type {
					public:
						VideoCodecEnum codec = static_cast<VideoCodecEnum>(0);
						Structs::VideoResolutionStruct::Type resolution;
						uint32_t minBitRate = static_cast<uint32_t>(0);

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					using DecodableType = Type;

				} // namespace RateDistortionTradeOffPointsStruct
				namespace AudioCapabilitiesStruct
				{
					enum class Fields : uint8_t {
						kMaxNumberOfChannels = 0,
						kSupportedCodecs = 1,
						kSupportedSampleRates = 2,
						kSupportedBitDepths = 3,
					};

					struct Type {
					public:
						uint8_t maxNumberOfChannels = static_cast<uint8_t>(0);
						DataModel::List<const AudioCodecEnum> supportedCodecs;
						DataModel::List<const uint32_t> supportedSampleRates;
						DataModel::List<const uint8_t> supportedBitDepths;

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					struct DecodableType {
					public:
						uint8_t maxNumberOfChannels = static_cast<uint8_t>(0);
						DataModel::DecodableList<AudioCodecEnum> supportedCodecs;
						DataModel::DecodableList<uint32_t> supportedSampleRates;
						DataModel::DecodableList<uint8_t> supportedBitDepths;

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;
					};

				} // namespace AudioCapabilitiesStruct
				namespace AudioStreamStruct
				{
					enum class Fields : uint8_t {
						kAudioStreamID = 0,
						kStreamUsage = 1,
						kAudioCodec = 2,
						kChannelCount = 3,
						kSampleRate = 4,
						kBitRate = 5,
						kBitDepth = 6,
						kReferenceCount = 7,
					};

					struct Type {
					public:
						uint16_t audioStreamID = static_cast<uint16_t>(0);
						Globals::StreamUsageEnum streamUsage =
							static_cast<Globals::StreamUsageEnum>(0);
						AudioCodecEnum audioCodec = static_cast<AudioCodecEnum>(0);
						uint8_t channelCount = static_cast<uint8_t>(0);
						uint32_t sampleRate = static_cast<uint32_t>(0);
						uint32_t bitRate = static_cast<uint32_t>(0);
						uint8_t bitDepth = static_cast<uint8_t>(0);
						uint8_t referenceCount = static_cast<uint8_t>(0);

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					using DecodableType = Type;

				} // namespace AudioStreamStruct
				namespace VideoSensorParamsStruct
				{
					enum class Fields : uint8_t {
						kSensorWidth = 0,
						kSensorHeight = 1,
						kMaxFPS = 2,
						kMaxHDRFPS = 3,
					};

					struct Type {
					public:
						uint16_t sensorWidth = static_cast<uint16_t>(0);
						uint16_t sensorHeight = static_cast<uint16_t>(0);
						uint16_t maxFPS = static_cast<uint16_t>(0);
						Optional<uint16_t> maxHDRFPS;

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					using DecodableType = Type;

				} // namespace VideoSensorParamsStruct
			} // namespace Structs
		} // namespace CameraAvStreamManagement
	} // namespace Clusters
} // namespace app
} // namespace chip
